LiveRevConQuote
METADATA
Attribute | Value |
---|---|
Topic | 1000-analytics |
MLink Token | OptAnalytics |
Product | SRAnalytics |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
okey_at | enum - AssetType | PRI | 'None' | cp Both |
okey_ts | enum - TickerSrc | PRI | 'None' | cp Both |
okey_tk | VARCHAR(12) | PRI | '' | cp Both |
okey_yr | SMALLINT UNSIGNED | PRI, SEC | 0 | cp Both |
okey_mn | TINYINT UNSIGNED | PRI, SEC | 0 | cp Both |
okey_dy | TINYINT UNSIGNED | PRI, SEC | 0 | cp Both |
okey_xx | DOUBLE | PRI | 0 | cp Both |
okey_cp | enum - CallPut | PRI | 'Call' | cp Both |
tradeDate | DATE | PRI | '1900-01-01' | |
ticker_at | enum - AssetType | 'None' | SR Ticker Product Group | |
ticker_ts | enum - TickerSrc | 'None' | SR Ticker Product Group | |
ticker_tk | VARCHAR(12) | SEC | '' | SR Ticker Product Group |
xAxis | FLOAT | 0 | xAxis Moneyness | |
cDe | FLOAT | 0 | call delta | |
pDe | FLOAT | 0 | put delta | |
uPrc | DOUBLE | 0 | live underlier price | |
atmVol | FLOAT | 0 | ||
years | FLOAT | 0 | number of volatility years to exiry date volatility time metric | |
globalRate | FLOAT | 0 | global rate average discount rate to expiry date | |
ddiv | FLOAT | 0 | sum of estimated discrete dividend stream to expiry date | |
ddivPv | FLOAT | 0 | present value of estimated discrete dividend stream to expiry date | |
ddivSource | enum - DDivSource | 'None' | present value of estimated discrete dividend stream to expiry date | |
iDays | INT | 0 | number of interest calendar days to expiry | |
ddivDisc | FLOAT | 0 | dividend discount factor SUMdiv iDays 3650 divYrs due to dividends being paid thereby lowering the uPrc basis prior to expiry | |
strikePv | FLOAT | 0 | strike EXPglobalRate iDays 365 | |
fairSVol | FLOAT | 0 | callput surface volatility value | |
fairSDiv | FLOAT | 0 | callput surface alignment sdiv value | |
fairCallPrc | FLOAT | 0 | fairPrice PRICEAMERICANuPrc years fairVol fairSDiv globalRate ddivStream | |
fairCallPrcE | FLOAT | 0 | fairPrice PRICEEUROPEANuPrc years fairVol fairSDiv globalRate ddivStream | |
fairPutPrc | FLOAT | 0 | fairPrice PRICEAMERICANuPrc years fairVol fairSDiv globalRate ddivStream | |
fairPutPrcE | FLOAT | 0 | fairPrice PRICEEUROPEANuPrc years fairVol fairSDiv globalRate ddivStream | |
rcFairPrc | FLOAT | 0 | fairCallPrc fairPutPrc uPrc strike revCon fairMid price | |
rcEExPrem | FLOAT | 0 | fairPutPrc fairPutPrcE fairCallPrc fairCallPrcE | |
fairLoanPv | FLOAT | 0 | fairCallPrc fairPutPrc uPrc strike strikePv ddivPv total present value of letting out shares term to expiry per share | |
fairLoanRate | FLOAT | 0 | fairLoanPv uPrc iDays 3650 ddivDisc | |
rcBidPrc | FLOAT | 0 | callBid putAsk uPrc strike best way join markets | |
rcAskPrc | FLOAT | 0 | callAsk putBid uPrc strike worst way cross markets | |
calcError | VARCHAR(16) | '' | ||
cpOI | INT | 0 | cp open interest market upper bound | |
cpVlm | INT | 0 | cp print volume this exchange upper bound | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | last update time Date |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
okey_tk | 1 |
okey_yr | 2 |
okey_mn | 3 |
okey_dy | 4 |
okey_xx | 5 |
okey_cp | 6 |
okey_at | 7 |
okey_ts | 8 |
tradeDate | 9 |
SECONDARY INDEX (ExpirationIndex) (Not Unique)
Field | Sequence |
---|---|
okey_yr | 1 |
okey_mn | 2 |
okey_dy | 3 |
SECONDARY INDEX (TickerIndex) (Not Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgLiveRevConQuote` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'cp = Both',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'cp = Both',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'cp = Both',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'cp = Both',
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'cp = Both',
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'cp = Both',
`okey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'cp = Both',
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'cp = Both',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'SR Ticker (Product Group)',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'SR Ticker (Product Group)',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'SR Ticker (Product Group)',
`xAxis` FLOAT NOT NULL DEFAULT 0 COMMENT 'xAxis = Moneyness',
`cDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'call delta',
`pDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'put delta',
`uPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'live underlier price',
`atmVol` FLOAT NOT NULL DEFAULT 0,
`years` FLOAT NOT NULL DEFAULT 0 COMMENT 'number of volatility years to exiry date (volatility time metric)',
`globalRate` FLOAT NOT NULL DEFAULT 0 COMMENT 'global rate (average discount rate) to expiry date',
`ddiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of estimated discrete dividend stream to expiry date',
`ddivPv` FLOAT NOT NULL DEFAULT 0 COMMENT 'present value of estimated discrete dividend stream to expiry date',
`ddivSource` ENUM('None','Announced','Forecast') NOT NULL DEFAULT 'None' COMMENT 'present value of estimated discrete dividend stream to expiry date',
`iDays` INT NOT NULL DEFAULT 0 COMMENT 'number of interest (calendar) days to expiry',
`ddivDisc` FLOAT NOT NULL DEFAULT 0 COMMENT 'dividend discount factor: SUM(div * iDays / 365.0 - divYrs) due to dividends being paid (thereby lowering the uPrc basis) prior to expiry',
`strikePv` FLOAT NOT NULL DEFAULT 0 COMMENT 'strike * EXP(-globalRate * iDays / 365)',
`fairSVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'call/put surface volatility value',
`fairSDiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'call/put surface alignment sdiv value',
`fairCallPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'fairPrice = PRICE.AMERICAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream})',
`fairCallPrcE` FLOAT NOT NULL DEFAULT 0 COMMENT 'fairPrice = PRICE.EUROPEAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream})',
`fairPutPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'fairPrice = PRICE.AMERICAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream})',
`fairPutPrcE` FLOAT NOT NULL DEFAULT 0 COMMENT 'fairPrice = PRICE.EUROPEAN(uPrc, years, fairVol, fairSDiv, globalRate, {ddivStream})',
`rcFairPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'fairCallPrc - fairPutPrc - uPrc + strike (revCon fairMid price)',
`rcEExPrem` FLOAT NOT NULL DEFAULT 0 COMMENT '(fairPutPrc - fairPutPrcE) - (fairCallPrc - fairCallPrcE)',
`fairLoanPv` FLOAT NOT NULL DEFAULT 0 COMMENT 'fairCallPrc - fairPutPrc - uPrc + strike + strikePv + ddivPv (total present value of letting out shares) (term to expiry) (per share)',
`fairLoanRate` FLOAT NOT NULL DEFAULT 0 COMMENT 'fairLoanPv / (uPrc * iDays / 365.0 - ddivDisc)',
`rcBidPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'callBid - putAsk - uPrc + strike (best way) (join markets)',
`rcAskPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'callAsk - putBid - uPrc + strike (worst way) (cross markets)',
`calcError` VARCHAR(16) NOT NULL DEFAULT '',
`cpOI` INT NOT NULL DEFAULT 0 COMMENT 'c/p open interest (market) [upper bound]',
`cpVlm` INT NOT NULL DEFAULT 0 COMMENT 'c/p print volume (this exchange) [upper bound]',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'last update time (Date)',
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`,`tradeDate`),
KEY `ExpirationIndex` (`okey_yr`,`okey_mn`,`okey_dy`) USING HASH,
KEY `TickerIndex` (`ticker_tk`) USING HASH
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`okey_at`,
`okey_ts`,
`okey_tk`,
`okey_yr`,
`okey_mn`,
`okey_dy`,
`okey_xx`,
`okey_cp`,
`tradeDate`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`xAxis`,
`cDe`,
`pDe`,
`uPrc`,
`atmVol`,
`years`,
`globalRate`,
`ddiv`,
`ddivPv`,
`ddivSource`,
`iDays`,
`ddivDisc`,
`strikePv`,
`fairSVol`,
`fairSDiv`,
`fairCallPrc`,
`fairCallPrcE`,
`fairPutPrc`,
`fairPutPrcE`,
`rcFairPrc`,
`rcEExPrem`,
`fairLoanPv`,
`fairLoanRate`,
`rcBidPrc`,
`rcAskPrc`,
`calcError`,
`cpOI`,
`cpVlm`,
`timestamp`
FROM `SRAnalytics`.`MsgLiveRevConQuote`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call'
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01';
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='LiveRevConQuote' ORDER BY ordinal_position ASC;